<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-model结合radio类型</title>
</head>
<script src="../js/vue.js"></script>
<body>

<div id="app">
    <label for="male">
        <input type="radio" id="male" value="男" v-model="sex">男
    </label>

    <label for="female">
        <input type="radio" id="female" value="女" v-model="sex">女
    </label>

    <br/>
    选择的性别是：
    <h2>{{sex}}</h2>
</div>

</body>

<script>
    const vue = new Vue({
        'el': '#app',
        'data': {
            sex: ''
        },
        'methods': {}
    })
</script>
</html>